<html><head><title>DeleteMapElement</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">DeleteMapElement()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>DeleteMapElement</b></font>(Map() [, Key$])  </blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Removes the current element or the element with the given key from the specified map. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Map()</i></td>
<td width="90%"> 
The map to use. 

</td></tr>
<tr><td><i>Key$ (optional)</i></td>
<td> 
The key for the item to remove. If this is not specified, then the current element 
of the map is removed. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns the memory address of the new current element of the map. If the map has no 
current element after the deletion, the result is 0. 

</blockquote><p><b>Remarks</b></p><blockquote>

After this call, the new current 
element is the previous element (the one before the deleted element), which is an arbitrary 
element, as a map isn't sorted. If that element does not exist (in other words, you deleted the first element in the map) 
then there is no more current element, as it will be before the first element, like 
after a <a href="resetmap.html">ResetMap()</a>. If there was only one element in the map when you deleted it then you are left 
with no current element! 
<br>
<br>
If the optional 'Key$' parameter is specified then there will be no more current element after this call. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">NewMap</font></b> <font color="#006666">Country</font>.s()

<font color="#006666">  Country</font>("US") = "United States"
<font color="#006666">  Country</font>("FR") = "France"
<font color="#006666">  Country</font>("GE") = "Germany"

  <font color="#006666">; Delete a country</font>
<font color="#006666">  DeleteMapElement</font>(<font color="#006666">Country</font>(), "FR")
  
  <b><font color="#006666">ForEach</font></b> <font color="#006666">Country</font>()
    <b><font color="#006666">Debug</font></b> <font color="#006666">Country</font>()
  <b><font color="#006666">Next</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="addmapelement.html">AddMapElement()</a>, <a href="clearmap.html">ClearMap()</a>, <a href="mapsize.html">MapSize()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=copymap.html>CopyMap()</a> - <a href=index.html>Map Index</a> - <a href=findmapelement.html>FindMapElement()</a> ->

</body></html>